<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>API: dragdrop  YAHOO.util.DDProxy   (YUI Library)</title>
	<link rel="stylesheet" type="text/css" href="assets/api.css">
    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">

	<div id="hd">
        <a href="http://developer.yahoo.com/yui/"><h1>Yahoo! UI Library</h1></a>
        <h3>Drag and Drop&nbsp; <span class="subtitle">2.3.1</span></h3>
        <p>
        <a href="./index.html">Yahoo! UI Library</a> 
            &gt; <a href="./module_dragdrop.html">dragdrop</a>
                 &gt; YAHOO.util.DDProxy 
                
            </p>

	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form name="yui-classopts-form">
    <span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> Show Private</span>
    <span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> Show Protected</span>
            </form>

                    <h2>
                        

                        
                        
                            Class <b>YAHOO.util.DDProxy</b>
                        <span class="extends">
                           - extends <a href="YAHOO.util.DD.html">YAHOO.util.DD</a>
                        </span>

                        <span class="extends">
                        </span>
                        
                        </code>
                    </h2>
                    <!-- class tree goes here -->
                    
                
  

                    <div class="summary description">
                        A DragDrop implementation that inserts an empty, bordered div into
the document that follows the cursor during drag operations.  At the time of
the click, the frame div is resized to the dimensions of the linked html
element, and moved to the exact location of the linked element.
References to the "frame" element refer to the single proxy element that
was created to be dragged in place of all DDProxy elements on the
page.
                    </div>

                        <div class="section constructor details">
                        <h3 id="constructor">Constructor</h3>
                        <div class="content">
                            <div class="detail">
                                <strong>YAHOO.util.DDProxy</strong>
                                <code>
                                    (
  
                                        
                                                
                                                id

                                                , 
                                                sGroup

                                                , 
                                                config
                                    )
                                </code>
                                <div class="description">
                                        <dl>
                                            <dt>Parameters:</dt>
                                                <dd>
                                                    <code>id
                                                    &lt;String&gt; 
                                                    </code>
                                                     the id of the linked html element
                                                </dd>
                                                <dd>
                                                    <code>sGroup
                                                    &lt;String&gt; 
                                                    </code>
                                                     the group of related DragDrop objects
                                                </dd>
                                                <dd>
                                                    <code>config
                                                    &lt;object&gt; 
                                                    </code>
                                                     an object containing configurable attributes
Valid properties for DDProxy in addition to those in DragDrop: 
resizeFrame, centerFrame, dragElId
                                                </dd>
                                        </dl>
                                    
                                    
                                </div>
                            </div>
                        </div>
                    </div>

                        <div class="section field details">
                            <h3 id="properties">Properties</h3>
                            <div class="content">
                                    <div class="">
                                    <h4><a name="centerFrame">centerFrame</a>
                                        <code>- boolean</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            By default the frame is positioned exactly where the drag element is, so
we use the cursor offset provided by YAHOO.util.DD.  Another option that works only if
you do not have constraints on the obj is to have the drag frame centered
around the cursor.  Set centerFrame to true for this effect.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4><a name="resizeFrame">resizeFrame</a>
                                        <code>- boolean</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            By default we resize the drag frame to be the same size as the element
we want to drag (this is to get the frame effect).  We can turn it off
if we want a different behavior.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4><a name="YAHOO.util.DDProxy.dragElId">YAHOO.util.DDProxy.dragElId</a>
                                        <code>- static String</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            The default drag frame div id
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>


                            </div>
                        </div>

                        <div class="section field inheritance">
                            <h4>Properties inherited from <a href="YAHOO.util.DD.html">YAHOO.util.DD</a>:</h4>
                            <div class="content">
                                <code>
                                    
                                        <a class="" href="YAHOO.util.DD.html#scroll">scroll</a>
                                </code>
                            </div>
                        </div>
                        <div class="section field inheritance">
                            <h4>Properties inherited from <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a>:</h4>
                            <div class="content">
                                <code>
                                    
                                        <a class="private" href="YAHOO.util.DragDrop.html#__ygDragDrop">__ygDragDrop</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#_domRef">_domRef</a><span class="private">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#available">available</a><span class="">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#config">config</a><span class="">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#constrainX">constrainX</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#constrainY">constrainY</a><span class="private">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#cursorIsOver">cursorIsOver</a><span class="">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#deltaX">deltaX</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#deltaY">deltaY</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#dragElId">dragElId</a><span class="private">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#groups">groups</a><span class="">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#handleElId">handleElId</a><span class="private">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#hasOuterHandles">hasOuterHandles</a><span class="">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#id">id</a><span class="">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#invalidHandleClasses">invalidHandleClasses</a><span class="">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#invalidHandleIds">invalidHandleIds</a><span class="">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#invalidHandleTypes">invalidHandleTypes</a><span class="">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#locked">locked</a><span class="private">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#maintainOffset">maintainOffset</a><span class="">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#maxX">maxX</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#maxY">maxY</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#minX">minX</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#minY">minY</a><span class="private">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#overlap">overlap</a><span class="">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#primaryButtonOnly">primaryButtonOnly</a><span class="">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#startPageX">startPageX</a><span class="private">,</span>
                                        <a class="private" href="YAHOO.util.DragDrop.html#startPageY">startPageY</a><span class="private">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#xTicks">xTicks</a><span class="">,</span>
                                        <a class="" href="YAHOO.util.DragDrop.html#yTicks">yTicks</a>
                                </code>
                            </div>
                        </div>

                        <div class="section method details">
                            <h3 id="methods">Methods</h3>
                            <div class="content">
                                    <div class="private">
                                    <h4>
                                        <a name="_resizeProxy">_resizeProxy</a></h4>
                                    <div class="detail">
                                        <code>
                                         private 
                                        
                                        
                                        void
                                            <strong>_resizeProxy</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            The proxy is automatically resized to the dimensions of the linked
element when a drag is initiated, unless resizeFrame is set to false
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="createFrame">createFrame</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>createFrame</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Creates the proxy element if it does not yet exist
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="initFrame">initFrame</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong>initFrame</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Initialization for the drag frame element.  Must be called in the
constructor of all subclasses
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4>
                                        <a name="showFrame">showFrame</a></h4>
                                    <div class="detail">
                                        <code>
                                         private 
                                        
                                        
                                        void
                                            <strong>showFrame</strong>
                                           (
                                                
                                                        
                                                         iPageX
                                                    
                                                
                                                        , 
                                                         iPageY
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Resizes the drag frame to the dimensions of the clicked object, positions 
it over the object, and finally displays it
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>iPageX &lt;int&gt;</code>
                                                             X click position
                                                        </dd>
                                                        <dd>
                                                            <code>iPageY &lt;int&gt;</code>
                                                             Y click position
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                            </div>
                        </div>

                            <div class="section field inheritance">
                                <h4>Methods inherited from <a href="YAHOO.util.DD.html">YAHOO.util.DD</a>:</h4>
                                <div class="content">
                                    <code>
                                            <a class="" href="YAHOO.util.DD.html#alignElWithMouse">alignElWithMouse</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DD.html#autoOffset">autoOffset</a><span class="">,</span>                                            <a class="private" href="YAHOO.util.DD.html#autoScroll">autoScroll</a><span class="private">,</span>                                            <a class="" href="YAHOO.util.DD.html#cachePosition">cachePosition</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DD.html#setDelta">setDelta</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DD.html#setDragElPos">setDragElPos</a>
                                    </code>
                                </div>
                            </div>
                            <div class="section field inheritance">
                                <h4>Methods inherited from <a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a>:</h4>
                                <div class="content">
                                    <code>
                                            <a class="" href="YAHOO.util.DragDrop.html#addInvalidHandleClass">addInvalidHandleClass</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#addInvalidHandleId">addInvalidHandleId</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#addInvalidHandleType">addInvalidHandleType</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#addToGroup">addToGroup</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#applyConfig">applyConfig</a><span class="">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#b4Drag">b4Drag</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#b4DragDrop">b4DragDrop</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#b4DragOut">b4DragOut</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#b4DragOver">b4DragOver</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#b4EndDrag">b4EndDrag</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#b4MouseDown">b4MouseDown</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#b4StartDrag">b4StartDrag</a><span class="private">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#clearConstraints">clearConstraints</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#clearTicks">clearTicks</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#endDrag">endDrag</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#getDragEl">getDragEl</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#getEl">getEl</a><span class="">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#getTargetCoord">getTargetCoord</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#getTick">getTick</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#handleMouseDown">handleMouseDown</a><span class="private">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#handleOnAvailable">handleOnAvailable</a><span class="private">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#init">init</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#initTarget">initTarget</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#isLocked">isLocked</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#isTarget">isTarget</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#isValidHandleChild">isValidHandleChild</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#lock">lock</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onAvailable">onAvailable</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onDrag">onDrag</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onDragDrop">onDragDrop</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onDragEnter">onDragEnter</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onDragOut">onDragOut</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onDragOver">onDragOver</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onInvalidDrop">onInvalidDrop</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onMouseDown">onMouseDown</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#onMouseUp">onMouseUp</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#padding">padding</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#removeFromGroup">removeFromGroup</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#removeInvalidHandleClass">removeInvalidHandleClass</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#removeInvalidHandleId">removeInvalidHandleId</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#removeInvalidHandleType">removeInvalidHandleType</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#resetConstraints">resetConstraints</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#setDragElId">setDragElId</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#setHandleElId">setHandleElId</a><span class="">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#setInitialPosition">setInitialPosition</a><span class="private">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#setOuterHandleElId">setOuterHandleElId</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#setPadding">setPadding</a><span class="">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#setStartPosition">setStartPosition</a><span class="private">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#setXConstraint">setXConstraint</a><span class="">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#setXTicks">setXTicks</a><span class="private">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#setYConstraint">setYConstraint</a><span class="">,</span>                                            <a class="private" href="YAHOO.util.DragDrop.html#setYTicks">setYTicks</a><span class="private">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#startDrag">startDrag</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#toString">toString</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#unlock">unlock</a><span class="">,</span>                                            <a class="" href="YAHOO.util.DragDrop.html#unreg">unreg</a>
                                    </code>
                                </div>
                            </div>






			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div class="module">
                        <h4>Modules</h4>
                        <ul class="content">

                                <li class=""><a href="module_animation.html">animation</a></li>

                                <li class=""><a href="module_autocomplete.html">autocomplete</a></li>

                                <li class=""><a href="module_button.html">button</a></li>

                                <li class=""><a href="module_calendar.html">calendar</a></li>

                                <li class=""><a href="module_colorpicker.html">colorpicker</a></li>

                                <li class=""><a href="module_connection.html">connection</a></li>

                                <li class=""><a href="module_container.html">container</a></li>

                                <li class=""><a href="module_datasource.html">datasource</a></li>

                                <li class=""><a href="module_datatable.html">datatable</a></li>

                                <li class=""><a href="module_dom.html">dom</a></li>

                                <li class="selected"><a href="module_dragdrop.html">dragdrop</a></li>

                                <li class=""><a href="module_editor.html">editor</a></li>

                                <li class=""><a href="module_element.html">element</a></li>

                                <li class=""><a href="module_event.html">event</a></li>

                                <li class=""><a href="module_history.html">history</a></li>

                                <li class=""><a href="module_imageloader.html">imageloader</a></li>

                                <li class=""><a href="module_logger.html">logger</a></li>

                                <li class=""><a href="module_menu.html">menu</a></li>

                                <li class=""><a href="module_slider.html">slider</a></li>

                                <li class=""><a href="module_tabview.html">tabview</a></li>

                                <li class=""><a href="module_treeview.html">treeview</a></li>

                                <li class=""><a href="module_yahoo.html">yahoo</a></li>

                                <li class=""><a href="module_yuiloader.html">yuiloader</a></li>

                                <li class=""><a href="module_yuitest.html">yuitest</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="YAHOO.util.DD.html">YAHOO.util.DD</a></li>
                                <li class="selected"><a href="YAHOO.util.DDProxy.html">YAHOO.util.DDProxy</a></li>
                                <li class=""><a href="YAHOO.util.DDTarget.html">YAHOO.util.DDTarget</a></li>
                                <li class=""><a href="YAHOO.util.DragDrop.html">YAHOO.util.DragDrop</a></li>
                                <li class=""><a href="YAHOO.util.DragDropMgr.html">YAHOO.util.DragDropMgr</a></li>
                                <li class=""><a href="YAHOO.util.DragDropMgr.ElementWrapper.html">YAHOO.util.DragDropMgr.ElementWrapper</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="DD.js.html">DD.js</a></li>
                                <li class=""><a href="DDProxy.js.html">DDProxy.js</a></li>
                                <li class=""><a href="DDTarget.js.html">DDTarget.js</a></li>
                                <li class=""><a href="DragDrop.js.html">DragDrop.js</a></li>
                                <li class=""><a href="DragDropMgr.js.html">DragDropMgr.js</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Properties</h4>
                        <ul class="content">        
                                <li class=""><a href="#centerFrame">centerFrame</a>
                                        <!--<code>&lt;String&gt;</code>-->
                                </li>
                                <li class=""><a href="#resizeFrame">resizeFrame</a>
                                        <!--<code>&lt;String&gt;</code>-->
                                </li>
                                <li class=""><a href="#YAHOO.util.DDProxy.dragElId">YAHOO.util.DDProxy.dragElId</a>
                                        <!--<code>&lt;String&gt;</code>-->
                                </li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Methods</h4>
                        <ul class="content">        
                                <li class="private"><!--<code>void</code>-->
                                <a href="#_resizeProxy">_resizeProxy</a>
                                </li>
                                <li class=""><!--<code>void</code>-->
                                <a href="#createFrame">createFrame</a>
                                </li>
                                <li class=""><!--<code>void</code>-->
                                <a href="#initFrame">initFrame</a>
                                </li>
                                <li class="private"><!--<code>void</code>-->
                                <a href="#showFrame">showFrame</a>
                                </li>
                        </ul>
                    </div>



            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2007 Yahoo! Inc. All rights reserved.
	</div>
</div>
</body>
</html>
